// Vue主体
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

//引入element-ui
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)

//引入自定义component
import blogSide from "./components/Side"
import blogHeader from "./components/Header"
import blogFooter from "./components/Footer"

Vue.component("BlogHeader", blogHeader)
Vue.component("BlogFooter", blogFooter)
Vue.component("BlogSide", blogSide)

//引入axios, 所有组件都可以this.axios.post(...)
import axios from 'axios'
Vue.prototype.axios = axios

//引入mavon-editor
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
Vue.use(mavonEditor)

//引入vue-cookie
import VueCookies from 'vue-cookies'
Vue.use(VueCookies)

//自定义全局函数
import CommonFunction from './util/oauth2.js';   //引入文件

Vue.prototype.CommonFunction = CommonFunction;   // 绑定到vue上面

// 显示生产环境的信息
Vue.config.productionTip = true

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
